﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;

/// <summary>
/// Summary description for Effects
/// </summary>
public class Effects
{
    public static void AddOnCLickPuff(AttributeCollection attributes, Control element)
    {
        AddOnClickEffect(attributes, element, "puff()");
    }

    public static void AddOnCLickSwitchOff(AttributeCollection attributes, Control element)
    {
        AddOnClickEffect(attributes, element, "switchOff()");
    }

    public Effects()
    {
        
    }

    public static void AddOnCLickHighlighting(AttributeCollection attributes, Control element)
    {
        AddOnClickEffect(attributes, element, "highlight({startcolor:'#ffff00'})");
    }

    private static void AddOnClickEffect(AttributeCollection attributes, Control element, string effect)
    {
        attributes.Add("onclick", string.Format("$('{0}').{1};", element.ClientID, effect));
    }
}
